interface dateOptions {
    isRange: boolean
    mode?: 'time' | 'date' | 'month' | 'year' | 'decade'
    picker?: 'date' | 'week' | 'month' | 'quarter' | 'year'
    format?: string
}

interface inputOptions {
    type?: string // input 类型，同原生 input 标签的 type 属性
    showCount?: boolean // 是否展示字数
    maxLength?: number
}

interface SelectPropsValue {
    value: string | number
    label: string
}

interface SelectOptions {
    options: Array<SelectPropsValue>,
    mode?: 'multiple' | 'tags' // 设置 Select 的模式为多选或标签
    allowClear?: boolean

}

interface FormItem {
    label: string // label文字
    prop: string | any // 字段名
    showTime?: Boolean, //显示时间,显示时分秒
    type: 'input' | 'date' | 'select' // 指定antd组件
    placeholder: string | Array<string>// antd组件属性
    dateOptions?: dateOptions  // antd日期组件选项
    inputOptions?: inputOptions // antd输入框组件选项
    selectOptions?: SelectOptions // 选择器组件选项
    rule?: Array<any> // antd组件属性
    defaultValue: string | number// 字段初始值
    clearable?: Boolean
    event: any //事件
}
interface FormButton {
    show: true | false
    event: any
}
interface CustomButton {
    label: string,
    type?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default'
    style: object,
    shape?: 'default' | 'circle' | 'round',
    clickEvent: void
}
interface FormList {
    item: Array<FormItem>,
    buttonItem?: Array<CustomButton>
    searchButton: FormButton
    resetButton: FormButton
}

export type {
    FormList,
    SelectOptions,
    CustomButton,
    SelectPropsValue
}